export const Line = (data) => {
    return {
        // title: {
        //     text: 'Stacked Line'
        // },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['完成数量']
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        toolbox: {
            feature: {
                saveAsImage: {}
            }
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: data.map(item => item.day),
            axisLabel: {interval:0, rotate: -45}
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                name: '完成数量',
                type: 'line',
                stack: 'Total',
                data: data.map(item => item.taskNum),
                smooth: true
            },
        ]
    }
}
